package com.lishao.soccer.service.impl;

import com.lishao.soccer.bean.entity.SmUser;
import com.lishao.soccer.bean.entity.TmTeamPlace;
import com.lishao.soccer.dao.TmTeamPlaceMapper;
import com.lishao.soccer.service.TmTeamPlaceService;

public class TmTeamPlaceServiceImpl implements TmTeamPlaceService {
	TmTeamPlaceMapper tmTeamPlaceMapper;
	public TmTeamPlace saveTeamPlace(TmTeamPlace tmTeamPlace,SmUser smUser){
		int iResult = 0;
		if(tmTeamPlace.getRowId()==null||tmTeamPlace.getRowId()==-1){
			//新增保存
			tmTeamPlace.setCreatedBy(smUser.getRowId());
			iResult = tmTeamPlaceMapper.insertSelective(tmTeamPlace);
		}else{
			//修改保存
			tmTeamPlace.setLastUpdBy(smUser.getRowId());
			iResult = tmTeamPlaceMapper.updateByPrimaryKeySelective(tmTeamPlace);
		}
		return tmTeamPlace;
	}
	//getset
	public TmTeamPlaceMapper getTmTeamPlaceMapper() {
		return tmTeamPlaceMapper;
	}

	public void setTmTeamPlaceMapper(TmTeamPlaceMapper tmTeamPlaceMapper) {
		this.tmTeamPlaceMapper = tmTeamPlaceMapper;
	}
}
